home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9934 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ cgi script using ODBC - How to ?
  5. Date: 5 Mar 1996 02:06:00 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4hg7i8$2ot@news1.usa.pipeline.com>
  8. References: <313B4156.6946@danish.com>
  9. NNTP-Posting-Host: pipe16.h1.usa.pipeline.com
  10. X-PipeUser: grantp
  11. X-PipeHub: usa.pipeline.com
  12. X-PipeGCOS: (Pete)
  13. X-Newsreader: Pipeline v3.5.0
  14.  
  15. On Mar 04, 1996 11:15:34 in article <C++ cgi script using ODBC - How to ?>,
  16. 'Ihab Badr <ihab@danish.com>' wrote: 
  17.  
  18.  
  19. >I am trying to write a cgi program using C++. This cgi program will need  
  20. >to access a database using ODBC. 
  21. >Because it is a cgi script I have no need for a CRecordView or any  
  22. >visual object for that matter. 
  23. >This means that the Wizard doesn't do a great deal for me and i have to  
  24. >do most of the work. 
  25. >So what do I have to do? Has anyone done this sort of thing before ? 
  26. >Does anyone have a sample app that I can look at to see how to set up  
  27. >the MFC WinApp object ? 
  28.  
  29. Not sure what a cgi script is, but if the program is not a Win32 GUI
  30. executable, 
  31. you will not be able to use the MFC ODBC classes.  Reason is that some of 
  32. the database functions require there to be a CWindow and CWinApp objects 
  33. to be instantiated.  This dependency may be removed in the future as 
  34. it isn't needed for database operations. 
  35.  
  36. You can use the ODBC API.  It's more work but not too difficult. 
  37. Bookstores 
  38. have MS Press ODBC 2.x Programmer's Reference manual.  It has many 
  39. examples as well as narrative programmer's guide style chapters. 
  40.  
  41. -- 
  42. Pete Grant 
  43. Kalevi, Inc. 
  44. Software Engineering & development
  45.